import latin1 from 'crypto-js/enc-latin1'
import utf8 from 'crypto-js/enc-utf8'
import mode from 'crypto-js/mode-ecb'
import padding from 'crypto-js/pad-pkcs7'
import aes from 'crypto-js/aes'

var key = latin1.parse('A-16-Byte-keyValA-16-Byte-keyVal')

const encrypt = str => aes.encrypt(str, key, { mode, padding })
const decrypt = str => utf8.stringify(aes.decrypt(str, key, { mode, padding }))

export { encrypt, decrypt }
